﻿
<div>
    <form name="callPoliceCreateOrEditForm" role="form" novalidate class="form-validation">
        <div class="modal-header">
            <h4 class="modal-title">
                <span ng-if="vm.callPolice.id">编辑信息:{{vm.callPolice.name}}</span>
                <span ng-if="!vm.callPolice.id">新增信息</span>
            </h4>
        </div>
        <div class="modal-body">


            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <select name="CallTypeID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.callPolice.callTypeID" ng-change="vm.callTypeChange(vm.callPolice.callTypeID)" required>
                    <option ng-repeat="x in vm.callTypeList" value="{{x.id}}" ng-selected="vm.callPolice.callTypeID==x.id">{{x.title}}</option>
                </select>
                <label>报警方式</label>
            </div>

            @*<div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="vm.showFile">
                <input type="text" class="form-control" name="FileID" ng-class="{'edited':vm.callPolice.fileID}" ng-model="vm.callPolice.fileID" required />
                <label>文件ID</label>
                <span class="help-block">     @L("FileID")@L("MustBe_Required")</span>
            </div>*@

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="vm.showFile">
                <input type="file" name="FileID" nv-file-select uploader="vm.uploader" />
            </div>
            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="vm.showFile">
                <label>文件路径</label>
                <a href="{{vm.fileUrl}}" ng-click="vm.downFile(vm.fileUrl)">{{ vm.fileTitle }}</a>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="XPoint" ng-class="{'edited':vm.callPolice.xPoint}" ng-model="vm.callPolice.xPoint" maxlength="100" required />
                <label>@L("XPoint")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="YPoint" ng-class="{'edited':vm.callPolice.yPoint}" ng-model="vm.callPolice.yPoint" maxlength="100" required />
                <label>@L("YPoint")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <textarea auto-focus class="form-control" ng-class="{'edited':vm.callPolice.address}" rows="4" ng-model="vm.callPolice.address"></textarea>
                <label>地址</label>
            </div>
            
            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <input type="text" class="form-control" name="Status" ng-class="{'edited':vm.callPolice.status}" ng-model="vm.callPolice.status" required />
                <label>状态</label>
                <span class="help-block">     @L("Status")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="vm.showDetail">
                <textarea auto-focus class="form-control" ng-class="{'edited':vm.callPolice.remarks}" rows="4" ng-model="vm.callPolice.remarks"></textarea>
                <label>备注</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <textarea auto-focus class="form-control" ng-class="{'edited':vm.callPolice.handleSuggestion}" rows="4" ng-model="vm.callPolice.handleSuggestion"></textarea>
                <label>处理意见</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <textarea auto-focus class="form-control" ng-class="{'edited':vm.callPolice.closedSuggestion}" rows="4" ng-model="vm.callPolice.closedSuggestion"></textarea>
                <label>结案意见</label>
            </div>




        </div>
        <div class="modal-footer">
            <button ng-disabled="vm.saving" type="button" class="btn btn-default" ng-click="vm.cancel()">@L("Cancel")</button>
            <button type="submit" button-busy="vm.saving" busy-text="@L("SavingWithThreeDot")" class="btn btn-primary blue" ng-click="vm.save()" ng-disabled="exampleForm.$invalid"><i class="fa fa-save"></i> <span>@L("Save")</span></button>
        </div>
    </form>
</div>